package com.android.kotlincoroutinemvvmdemo.webviewevent

import android.content.Context
import android.webkit.JavascriptInterface
import android.widget.Toast

class JavaScriptObject(context: Context) {

    private val mContext = context

    @JavascriptInterface
    fun toastString(content: String) {
        Toast.makeText(mContext, content, Toast.LENGTH_SHORT).show()
    }

    @JavascriptInterface
    fun toHtmlJson() : String {
        return "json to json"
    }
}